wayland: unmap popup along with its toplevel
authorOlivier Fourdan <ofourdan@redhat.com>
Mon, 5 Sep 2016 15:53:38 +0000 (17:53 +0200)
committerOlivier Fourdan <ofourdan@redhat.com>
Mon, 12 Sep 2016 08:03:58 +0000 (10:03 +0200)
commiteb17ee1c26bb5faf08d50264dbe5fcfc79e0666c
treea46445a6fe4ddccca1ce8cdcb3c04b04ce9719f3
parent50595cc63f35f4a7c7ae0be3763dd6c2a7706b2d
wayland: unmap popup along with its toplevel

If an application umaps the toplevel from its popup callback, this can
lead to a protocol error.

Make sure we mark popup parent and use that to check if their parent is
the toplevel being unmapped in which case we shall unmap the popup first
to avoid the protocol error.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=770906
gdk/wayland/gdkwindow-wayland.c